<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./js/jquery.js"></script>
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      .uls {
        width: 180px;
        list-style: none;
        border: 1px solid blue;
        margin: 20px 50px;
      }
      .uls > li {
        width: 100%;
        list-style: none;
        border: 1px solid blue;
      }
      .uls li .box-top img {
        width: 50px;
      }
      .uls li .box-top {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        cursor: pointer;
      }
      .box-bottom {
        width: 100%;
        display: none;
         display: flex;
         justify-content: space-evenly;
        align-items: center;
        cursor: pointer;
      }
      .box-bottom ul > li {
        list-style: none;
        margin-top: 20px;
         width: 180px;
         height: 40px;
         cursor: pointer;
         text-align: center;
         line-height: 40px;
      }
      .box-bottom ul > li:hover{
        color: aliceblue;
      }
    </style>
  </head>
  <body>
    <ul class="uls">
      <li>
        <div class="box-top">
          <img src="./img/jiahao.png" alt="" />
          <span>系统设置</span>
        </div>
        <div class="box-bottom">
          <ul>
            <li>菜单页面</li>
            <li>角色管理</li>
            <li>权限管理</li>
          </ul>
        </div>
      </li>
      <li>
        <div class="box-top">
          <img src="./img/jiahao.png" alt="" />
          <span>图片管理</span>
        </div>
        <div class="box-bottom">
          <ul>
            <li>添加图片</li>
            <li>图片设置</li>
            <li>权限管理</li>
          </ul>
        </div>
      </li>
    </ul>
    <script>
      $(function () {
        $(".box-top").click(function () {
          $(this).next(".box-bottom").slideToggle();
        });
        $(".box-bottom ul li").hover(function () {
            $(this).css({
              background: "red",
            });
  
        }, function () {
            $(this).css({
              background: "",
            });
        })
      });
    </script>
  </body>
</html>
